home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / Aztec C 5.0a disk 1.adf / include / stdlib.h < prev    next >
C/C++ Source or Header  |  1989-11-06  |  2KB  |  92 lines

  1. /* Copyright 1989 Manx Software Systems, Inc. All rights reserved */
  2.  
  3. #ifndef __STDLIB_H
  4. #define __STDLIB_H
  5.  
  6. # ifndef _SIZE_T
  7. # define _SIZE_T
  8.   typedef unsigned long size_t;
  9. # endif
  10.  
  11. #ifndef _WCHAR_T
  12. #define _WCHAR_T
  13. typedef char wchar_t;
  14. #endif
  15.  
  16. # ifndef ERANGE
  17. #define ERANGE 13
  18. # endif
  19.  
  20. #ifndef NULL
  21. #define NULL ((void *)0)
  22. #endif
  23.  
  24. #define EXIT_FAILURE (-1)
  25. #define EXIT_SUCCESS 0
  26.  
  27. #ifdef _FLT_IEEE
  28. #define HUGE_VAL    1.797693134862316E+308
  29. #else
  30. #define HUGE_VAL    9.22337177E+17
  31. #endif
  32.  
  33. #define RAND_MAX 32767
  34.  
  35. #define    MB_CUR_MAX    1
  36. #define    MB_LEN_MAX    1
  37.  
  38. typedef struct {
  39.     int quot;
  40.     int rem;
  41. } div_t;                        /* quotient and remainder for div() */
  42.  
  43. typedef struct {
  44.     long quot;
  45.     long rem;
  46. } ldiv_t;                        /* quotient and remainder for ldiv() */
  47.  
  48. double atof(const char *_nptr);
  49. int atoi(const char *_nptr);
  50. long int atol(const char *_nptr);
  51. double strtod(const char *_nptr, char **_endptr);
  52. long int strtol(const char *_nptr, char **_endptr, int _base);
  53. unsigned long int strtoul(const char *_nptr, char **_endptr, int _base);
  54.  
  55. int rand(void);
  56. void srand(unsigned int _seed);
  57.  
  58. void *calloc(size_t _nmemb, size_t _size);
  59. void free(void *_ptr);
  60. void *malloc(size_t _size);
  61. void *realloc(void *_ptr, size_t _size);
  62.  
  63. void abort(void);
  64. int atexit(void (*_func)(void));
  65. void exit(int _status);
  66. char *getenv(const char *_name);
  67. int system(const char *_string);
  68.  
  69. void *bsearch(const void *_key, const void *_base, size_t _nmemb, size_t _size,
  70.                                 int (*_compar)(const void *, const void *));
  71. void qsort(void *_base, size_t _nmemb, size_t _size,
  72.                                 int (*_compar)(const void *, const void *));
  73.  
  74. int abs(int _j);
  75. div_t div(int _numer, int _denom);
  76. long int labs(long int _j);
  77. ldiv_t ldiv(long int _numer, long int _denom);
  78.  
  79. int mblen(const char *_s, size_t _n);
  80. int mbtowc(wchar_t *_pwc, const char *_s, size_t _n);
  81. int wctomb(char *_s, wchar_t _wchar);
  82. size_t mbstowcs(wchar_t *_pwcs, const char *_s, size_t _n);
  83. size_t wcstombs(char *_s, const wchar_t *_pwcs, size_t _n);
  84.  
  85. #if !__STDC__
  86. /* non ANSI C functions */
  87. void ftoa(double _val, char *_buf, int, int);
  88. long double strtold(const char *_nptr, char **_endptr);
  89. #endif    /* !__STDC__ */
  90.  
  91. #endif    /* _STDLIB_H */
  92.